home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Prog / N-P / OmniScript 2.0.1 / Examples / Droplet Examples / Change Creator.Setup next >
Encoding:
Text File  |  1993-09-15  |  709 b   |  34 lines  |  [TEXT/ttxt]

  1. *This droplet changes the file creator
  2. *
  3. droplet 'Change Document Type'
  4. *
  5. * Setup the menu
  6. *
  7. a = 'ExPr EDIT ttxt "Define it<I"'
  8. lval a,$Creator
  9. menu new,21,0,$Creator
  10. menuscript 21,'Define Creator'
  11. $cre = 'ExPr'  !! This is the default value
  12. display 'Creator will be changed to '$cre
  13. *
  14. * This is the script that makes the changes
  15. *
  16. script 'Change Document Type'
  17. display #file(typ)' '#file(cre)' '$File
  18. change cre=$cre
  19. info
  20. *
  21. * This is the script executed by the menu
  22. * It defines the creator
  23. *
  24. script 'Define Creator'
  25. if #arg(2) = $Creator
  26.     accept a,'Enter 4 character Creator'
  27.     test (#ret) exit
  28.     test (#len(a) != 4) exit
  29.     $cre = a
  30. else
  31.     $cre = $Creator[#arg(2)]
  32. end
  33. display 'Creator will be changed to '$cre
  34.